/*
 * INSANE - Interactive Structural Analysis Environment
 *
 * Copyright (C) 2003-2006
 * Universidade Federal de Minas Gerais
 * Escola de Engenharia
 * Departamento de Engenharia de Estruturas
 *
 * Author's email :     insane@dees.ufmg.br
 * Author's Website :   http://www.dees.ufmg.br/insane
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
 
package br.ufmg.dees.insane.draw;

import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Shape;

/**
 * Defines the methods that implement a drawer.
 *
 * @author Fonseca, Flavio & Pitangueira, Roque
 * @since April 2004
 */
public interface Drawable {
	
//*****************************************************************************
	
    /**
     * Draws in a given Graphics.
     *
     * @see   java.awt.Graphics
     */
    public void draw(Graphics2D g);
	
//*****************************************************************************
	
    /**
     * Sets the orientation. The orientation can be HORIZONTAL or
     * VERTICAL.
     *
     * @param orient The orientation.
     */
    public void setOrientation(int orient);
    
//*****************************************************************************
	
	/**
     * Returns the orientation.
     *
     * @return the orientation
     */
    public int getOrientation();
    
//*****************************************************************************
	
	/**
     * Sets the draw position in device coordinates.
     *
     * @param loc draw position
     */
    public void setLocation(Point loc);
    
//*****************************************************************************
	
	/**
     * Returns the draw position in device coordinates.
     *
     * @return the draw position
     */
    public Point getLocation();
    
//*****************************************************************************
	
	/**
     * Sets the draw dimension in divice coordinates
     *
     * @param dim The new dimension
     */
    public void setSize(Dimension dim);
    
//*****************************************************************************
	
	/**
     * Returns the draw dimension
     *
     * @return The draw dimension
     */
    public Dimension getSize();
    
//*****************************************************************************
	
	/**
     * Returns the draw bounds in device units.
     *
     * @return the draw bounds
     */
    public Rectangle getBounds();
    
//*****************************************************************************
	
	/**
     * Returns the draw bounds in device units.
     *
     * @return the draw bounds
     */
    public Shape getRotatedBounds();
    
//*****************************************************************************
	
	/**
     * Draws at arbitrary rotation.
     */
    public void setAngle(double theta);
    
//*****************************************************************************
	
	/**
     * Returns draw angle.
     *
     * @return The angle of rotation.
     */
    public double getAngle();
    
//*****************************************************************************
	
	/**
     * Sets the draw scale.
     */
    public void setScale(double scale);
    
//*****************************************************************************
	
	/**
     * Returns the draw scale.
     *
     * @return The draw scale.
     */
    public double getScale();
	
//*****************************************************************************
}